package com.wkbb.sports.enums;

public enum SportsUnitEnum {

    UNIT_KG(1,"千克/米²"),
    UNIT_MILLILITER(2,"毫升"),
    UNIT_MINUTE(3,"分·秒"),
    UNIT_SECOND(4,"秒"),
    UNIT_METRES(5,"米"),
    UNIT_CM(6,"厘米"),
    UNIT_TIMES(7,"次");

    private SportsUnitEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(String value) {
        for (SportsUnitEnum buttonTypeEnum : SportsUnitEnum.values()) {
            if (buttonTypeEnum.getValue().equals(value)) {
                return buttonTypeEnum.getDesc();
            }
        }
        return null;
    }
}
